Handle the case without XKB properly.
authorOwen Taylor <otaylor@redhat.com>
Thu, 21 Jun 2001 17:45:26 +0000 (17:45 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 21 Jun 2001 17:45:26 +0000 (17:45 +0000)
Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>

* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
the case without XKB properly.

* gtk/gtkrc.c (gtk_rc_set_default_files): Remove
unused gtk_rc_auto_parse variable.

* gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
longer needed with GdkPixbuf.

* gtk/gtkrc.c (_gtk_rc_init): Make private.

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/Changes-2.0.txt
gdk/x11/gdkkeys-x11.c
gtk/gtkentry.h
gtk/gtkmain.c
gtk/gtkrc.c
gtk/gtkrc.h
gtk/gtkstyle.c

index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 0c97a5280414522100d3919bd0d6d106d9693dd5..fe1fabff785d2fcbe35d4dc69c576e304d44dfa8 100644 (file)
@@ -1,3 +1,37 @@
+Thu Jun 21 13:42:01 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkkeys-x11.c (gdk_keymap_get_direction): Handle
+       the case without XKB properly.
+
+       * gtk/gtkrc.c (gtk_rc_set_default_files): Remove
+       unused gtk_rc_auto_parse variable.
+
+       * gtk/gtkrc.[ch] gtk/gtkstyle.c docs/Changes-2.0.txt:
+       Remove gtk_rc_set_image_loader(), gtk_rc_load_image(), no
+       longer needed with GdkPixbuf.
+
+       * gtk/gtkrc.c (_gtk_rc_init): Make private.
+
+Fri Jun 15 16:26:12 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.h: Mark deprecated functions with
+       GTK_DISABLE_DEPRECATED.
+
+Mon Jun 11 18:15:16 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdk.h: Add missing gdk_rectangle_get_type() prototype.
+
+       * gtk/gtk[hv]scale.c: Include math.h, stdlib.h
+
+       * gdk/gdkpango.h gtk/gtkclist.c gtk/gtkentry.c gtk/gtkmain.[ch]
+         gtk/gtkspinbutton.c gtk/gtkstyle.c gtk/gtktextbuffer.c
+         gtk/gtktextdisplay.c gtk/gtktextiter.[ch]
+         gtk/gtktextlayout.c gtk/gtktexttag.[ch] gtk/gtkwidget.c: Adapt
+         to recent changes in Pango.
+
+       * tests/testgtk.c: Set language tags with gtk_label_set_markup()
+         to test whether the basic engine honors them.
+
 Thu Jun 21 02:13:40 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkcontainer.[hc]: added gtk_container_child_set_property() and
@@ -136,7 +170,7 @@ Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * demos/gtk-demo/main.c (main): fix colors ;-)
 
-Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
+`Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
        that allows grouping together multiple windows so that grabs
index 69e791761578d27bd1adbb7783a4cd3d674b577a..56a8fe88ad6ce9521f6ae969033970d2ca2d55c8 100644 (file)
@@ -364,4 +364,5 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
   The purpose of this change was to allow non-containers to have 
   focusable elements.
  
\ No newline at end of file
+* gtk_rc_set_image_loader() and gtk_rc_load_image() has been removed, now 
+  that GTK+ includes decent image loading capabilities itself.
index 6e18a6337e992d87a6ff7125ca9d7e153969eefa..4b353c85731c69fedff8700f748167042f238a31 100644 (file)
@@ -192,7 +192,6 @@ get_keymap (void)
 }
 
 #if HAVE_XKB
-
 PangoDirection
 get_direction (void)
 {
@@ -236,13 +235,20 @@ _gdk_keymap_state_changed (void)
 PangoDirection
 gdk_keymap_get_direction (GdkKeymap *keymap)
 {
-  if (!have_direction)
+#if HAVE_XKB
+  if (_gdk_use_xkb)
     {
-      current_direction = get_direction ();
-      have_direction = TRUE;
-    }
+      if (!have_direction)
+       {
+         current_direction = get_direction ();
+         have_direction = TRUE;
+       }
   
-  return current_direction;
+      return current_direction;
+    }
+  else
+#endif /* HAVE_XKB */
+    return PANGO_DIRECTION_LTR;
 }
 
 /**
index 746d8c9c3d73be0c3c7d9842828e4883296fe6b0..b639e13e5dde535de350bea8d54a35d43663539d 100644 (file)
@@ -181,6 +181,8 @@ void         gtk_entry_get_layout_offsets       (GtkEntry      *entry,
 
 /* Deprecated compatibility functions
  */
+
+#ifndef GTK_DISABLE_DEPRECATED
 GtkWidget* gtk_entry_new_with_max_length       (gint           max);
 void       gtk_entry_append_text               (GtkEntry      *entry,
                                                 const gchar   *text);
@@ -191,6 +193,7 @@ void       gtk_entry_set_position                   (GtkEntry      *entry,
 void       gtk_entry_select_region             (GtkEntry      *entry,
                                                 gint           start,
                                                 gint           end);
+#endif /* GTK_DISABLE_DEPRECATED */
 
 #ifdef __cplusplus
 }
index 2d45b4fc148050779f602884ada9534bd8cd1054..6807dae8f292b9bcf91cf8e3f6a7ab6e535975dc 100644 (file)
@@ -487,7 +487,7 @@ gtk_init_check (int  *argc,
   gtk_colormap = gdk_colormap_get_system ();
 
   gtk_type_init (0);
-  gtk_rc_init ();
+  _gtk_rc_init ();
   
   
   /* Register an exit function to make sure we are able to cleanup.
index 9480df31ba4f32bcdb252600cf47394f4a3306a9..4766fa56e18c0f6155c2f304025c9794265333d4 100644 (file)
@@ -247,7 +247,6 @@ static GSList *gtk_rc_sets_class = NULL;
 
 #define GTK_RC_MAX_DEFAULT_FILES 128
 static gchar *gtk_rc_default_files[GTK_RC_MAX_DEFAULT_FILES];
-static gboolean gtk_rc_auto_parse = TRUE;
 
 #define GTK_RC_MAX_PIXMAP_PATHS 128
 static gchar *pixmap_path[GTK_RC_MAX_PIXMAP_PATHS];
@@ -262,8 +261,6 @@ static GSList *rc_dir_stack = NULL;
 /* The files we have parsed, to reread later if necessary */
 static GSList *rc_files = NULL;
 
-static GtkImageLoader image_loader = NULL;
-
 /* RC file handling */
 
 
@@ -492,7 +489,6 @@ gtk_rc_set_default_files (gchar **files)
     }
     
   gtk_rc_default_files[0] = NULL;
-  gtk_rc_auto_parse = FALSE;
 
   i = 0;
   while (files[i] != NULL)
@@ -560,7 +556,7 @@ gtk_rc_get_default_files (void)
  }
  
 void
-gtk_rc_init (void)
+_gtk_rc_init (void)
 {
   static gboolean initialized = FALSE;
   static gchar *locale_suffixes[3];
@@ -3276,37 +3272,3 @@ gtk_rc_parse_stock (GScanner       *scanner,
 
   return G_TOKEN_NONE;
 }
-
-/*
-typedef  GdkPixmap * (*GtkImageLoader) (GdkWindow   *window,
-                                        GdkColormap *colormap,
-                                        GdkBitmap  **mask,
-                                        GdkColor    *transparent_color,
-                                        const gchar *filename);
-*/
-
-void
-gtk_rc_set_image_loader(GtkImageLoader loader)
-{
-  image_loader = loader;
-}
-
-GdkPixmap *
-gtk_rc_load_image (GdkColormap *colormap,
-                  GdkColor    *transparent_color,
-                  const gchar *filename)
-{
-  if (strcmp (filename, "<parent>") == 0)
-    return (GdkPixmap*) GDK_PARENT_RELATIVE;
-  else
-    {
-      if(image_loader)
-       return image_loader(NULL, colormap, NULL,
-                           transparent_color,
-                           filename);
-      else
-       return gdk_pixmap_colormap_create_from_xpm (NULL, colormap, NULL,
-                                                   transparent_color,
-                                                   filename);
-    }
-}
index c68a13d2090439889638a814693e1c8064aa4cce..1507b177ac9163f57fdae8bf640fc4e1bdef2c91 100644 (file)
@@ -38,6 +38,9 @@ extern "C" {
 /* Forward declaration */
 typedef struct _GtkIconFactory GtkIconFactory;
 
+typedef struct _GtkRcStyleClass GtkRcStyleClass;
+typedef struct _GtkRCContext    GtkRcContext;
+
 #define GTK_TYPE_RC_STYLE              (gtk_rc_style_get_type ())
 #define GTK_RC_STYLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_RC_STYLE, GtkRcStyle))
 #define GTK_RC_STYLE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_RC_STYLE, GtkRcStyleClass))
@@ -53,8 +56,6 @@ typedef enum
   GTK_RC_BASE          = 1 << 3
 } GtkRcFlags;
 
-typedef struct _GtkRcStyleClass GtkRcStyleClass;
-
 struct _GtkRcStyle
 {
   GObject parent_instance;
@@ -112,14 +113,15 @@ struct _GtkRcStyleClass
   GtkStyle * (*create_style) (GtkRcStyle *rc_style);
 };
 
-void     gtk_rc_init                   (void);
+void     _gtk_rc_init                  (void);
 void      gtk_rc_add_default_file      (const gchar *filename);
 void      gtk_rc_set_default_files      (gchar **filenames);
 gchar**   gtk_rc_get_default_files      (void);
 void     gtk_rc_parse                  (const gchar *filename);
 void     gtk_rc_parse_string           (const gchar *rc_string);
-gboolean  gtk_rc_reparse_all           (void);
 GtkStyle* gtk_rc_get_style             (GtkWidget   *widget);
+
+gboolean  gtk_rc_reparse_all           (void);
 void     gtk_rc_add_widget_name_style  (GtkRcStyle  *rc_style,
                                         const gchar *pattern);
 void     gtk_rc_add_widget_class_style (GtkRcStyle  *rc_style,
@@ -127,25 +129,14 @@ void        gtk_rc_add_widget_class_style (GtkRcStyle  *rc_style,
 void     gtk_rc_add_class_style        (GtkRcStyle  *rc_style,
                                         const gchar *pattern);
 
+
+
 GType       gtk_rc_style_get_type   (void) G_GNUC_CONST;
 GtkRcStyle* gtk_rc_style_new        (void);
 GtkRcStyle* gtk_rc_style_copy       (GtkRcStyle *orig);
 void        gtk_rc_style_ref        (GtkRcStyle *rc_style);
 void        gtk_rc_style_unref      (GtkRcStyle *rc_style);
 
-/* Tell gtkrc to use a custom routine to load images specified in rc files instead of
- *   the default xpm-only loader
- */
-typedef        GdkPixmap*  (*GtkImageLoader)           (GdkWindow      *window,
-                                                GdkColormap    *colormap,
-                                                GdkBitmap     **mask,
-                                                GdkColor       *transparent_color,
-                                                const gchar    *filename);
-void           gtk_rc_set_image_loader         (GtkImageLoader  loader);
-
-GdkPixmap*     gtk_rc_load_image               (GdkColormap    *colormap,
-                                                GdkColor       *transparent_color,
-                                                const gchar    *filename);
 gchar*         gtk_rc_find_pixmap_in_path      (GScanner       *scanner,
                                                 const gchar    *pixmap_file);
 gchar*         gtk_rc_find_module_in_path      (const gchar    *module_file);
index 87ad7f8d543d1a97f5b74704cb30473bf8e33761..63c90ce34fb20cc40c8ddcb9a9fa7b68a84729b2 100644 (file)
@@ -1377,6 +1377,21 @@ _gtk_style_peek_property_value (GtkStyle           *style,
   return &pcache->value;
 }
 
+GdkPixmap *
+load_bg_image (GdkColormap *colormap,
+              GdkColor    *bg_color,
+              const gchar *filename)
+{
+  if (strcmp (filename, "<parent>") == 0)
+    return (GdkPixmap*) GDK_PARENT_RELATIVE;
+  else
+    {
+      return gdk_pixmap_colormap_create_from_xpm (NULL, colormap, NULL,
+                                                 bg_color,
+                                                 filename);
+    }
+}
+
 static void
 gtk_style_real_realize (GtkStyle *style)
 {
@@ -1421,9 +1436,9 @@ gtk_style_real_realize (GtkStyle *style)
   for (i = 0; i < 5; i++)
     {
       if (style->rc_style && style->rc_style->bg_pixmap_name[i])
-        style->bg_pixmap[i] = gtk_rc_load_image (style->colormap,
-                                                 &style->bg[i],
-                                                 style->rc_style->bg_pixmap_name[i]);
+        style->bg_pixmap[i] = load_bg_image (style->colormap,
+                                            &style->bg[i],
+                                            style->rc_style->bg_pixmap_name[i]);
       
       if (!gdk_color_alloc (style->colormap, &style->fg[i]))
         g_warning ("unable to allocate color: ( %d %d %d )",